package com.netease.financial.base.share.action;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

import com.netease.financial.R;
import com.netease.financial.base.share.model.ShareHolder;

/**
 * Created by wyf on 6/24/15.
 */
public class OpenInBrowserAction extends BaseShareAction {

    @Override
    public int getIconResId() {
        return R.drawable.ic_share_action_browser;
    }

    @Override
    public int getLabelResId() {
        return R.string.share_action_browser;
    }

    @Override
    public boolean share(Context context, ShareHolder holder) {
        super.share(context,holder);
        Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setData(Uri.parse(holder.webUrl));
        context.startActivity(intent);
        return true;
    }
}
